/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author dvasquez
 */
@Embeddable
public class MedicionesCTRPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "controlNumero")
    private int controlNumero;
    @Basic(optional = false)
    @Column(name = "ID")
    private int id;

    public MedicionesCTRPK() {
    }

    public MedicionesCTRPK(int controlNumero, int id) {
        this.controlNumero = controlNumero;
        this.id = id;
    }

    public int getControlNumero() {
        return controlNumero;
    }

    public void setControlNumero(int controlNumero) {
        this.controlNumero = controlNumero;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) controlNumero;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MedicionesCTRPK)) {
            return false;
        }
        MedicionesCTRPK other = (MedicionesCTRPK) object;
        if (this.controlNumero != other.controlNumero) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.MedicionesCTRPK[controlNumero=" + controlNumero + ", id=" + id + "]";
    }

}
